<template>
  <div class="product-item">
    <div class="name">{{info.name}}</div>
    <p class="desc">{{info.desc}}</p>
    <div class="cover-wrap">
      <img :src="info.cover" alt="">
    </div>
    <div class="price">￥{{info.price}}</div>
    <div class="btn-wrap">
      <a :href="'/Tpl/productDetail.html#position?product_id=' + info.product_id" class="btn-one">查看详情</a>
      <!-- <a href="javascript:void(0);" class="btn-two">立即登记</a> -->
    </div>
  </div>
</template>

<script>
  export default {
    name: 'product-item',
    props: {
      info: {
        type: Object,
        default: function() {
          return {
            product_id: 1,
            name: 'M--XC2bC雷达001',
            desc: '给你的产品添加一些简要的描述，尽量简单明了给你的产品添加一些简要的描述，尽量简单明了，最好不要超过三行字，最好不要超过三行字！',
            cover: '',
            price: '380.00'
          }
        }
      }
    },
    data() {
      return {

      }
    }
  }
</script>

<style lang="less">
  @import '~COMMON/common.less';

  .product-item {
    cursor: default;
    display: inline-block;
    box-sizing: border-box;
    text-align: center;
    width: 350px;
    height: 500px;
    padding: 30px 30px 40px 40px;
    border: 1px solid #dcdcdc;
    border-radius: 5px;
    transition: all 0.2s;
    &:hover {
      box-shadow: 0px 2px 13px 0px rgba(0, 0, 0, 0.35);
    }
    .name {
      font-size: 22px;
      font-weight: bold;
    }
    .desc {
      .Mult-line(3);
      font-size: 14px;
      line-height: 20px;
      margin-top: 20px;
      margin-bottom: 25px;
      color: #666;
    }
    .cover-wrap {
      width: 100%;
      height: 180px;
      background-color: #f3f3f3;
      border-radius: 5px;
      >img {
        width: 100%;
        height: 100%;
      }
    }
    .price {
      font-size: 24px;
      color: #080808;
      margin: 25px 0;
    }
    .btn-wrap {
      >a {
        width: 100%;
        line-height: 40px;
      }
      .btn-two {
        display: inline-block;
        margin-left: 25px;
        color: #fff;
        background-color: #1c5baa;
        border-radius: 5px;
      }
    }
  }
</style>